home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / tcpatch.arc / AUTOPA.BAT next >
DOS Batch File  |  1987-07-12  |  4KB  |  92 lines

  1. Echo Off
  2. Rem
  3. Rem  This batch file will automate the process of appling patches to
  4. Rem  Turbo/C compiler and compiler/editor.  Once the patches have been
  5. Rem  applied they will be appended into a single file 'PATCHED.TC' and
  6. Rem  'PATCHED.TCC' so that you can browse them later.
  7. Rem
  8. Rem  Note, as noted in the PATCH.DOC file, there may be a case that one
  9. Rem  patch must be applied before another.  In these cases I suggest you
  10. Rem  apply the patch manually.
  11. Rem
  12. Rem  Note, below you'll see multiple FOR's with masks such as
  13. Rem  ??????TC.DIF, ?????TC.DIF, ????TC.DIF, ???TC.DIF, ??TC.DIF
  14. Rem  ?TC.DIF etc. The mutilple formats for the generic file name
  15. Rem  should handle any patch that Borland comes out with, as long
  16. Rem  as the filename ends in TC or TCC.
  17. Rem
  18. Rem  Make a backup of the current TC.EXE file before continuing.
  19. Rem
  20. COPY TC.EXE  TC.OLD
  21. Rem
  22. Rem  Create a file so that we can put the date/time in PATCHED.TC. This
  23. Rem  was the only way I could find to put the date into  the PATCHED.TC
  24. Rem  files w/i a batch file.
  25. Rem
  26. Del  PATCHED.ON
  27. Echo X > PATCHED.ON
  28. Echo . >> PATCHED.TC
  29. Echo . The following patches were applied on the date shown in 'PATCHED ON' >> PATCHED.TC
  30. Echo .
  31. Dir  PATCHED.ON >> PATCHED.TC
  32. Dir  *.DIF >> PATCHED.TC
  33. Echo . >> PATCHED.TC
  34. Echo . The following is the contents of the above files >> PATCHED.TC
  35. Echo . >> PATCHED.TC
  36. For %%F In (??????TC.DIF) DO TYPE %%F >> PATCHED.TC
  37. For %%F In (?????TC.DIF) DO  TYPE %%F >> PATCHED.TC
  38. For %%F In (????TC.DIF) DO  TYPE %%F >> PATCHED.TC
  39. For %%F In (???TC.DIF) DO  TYPE %%F >> PATCHED.TC
  40. For %%F In (??TC.DIF) DO  TYPE %%F >> PATCHED.TC
  41. For %%F In (?TC.DIF) DO  TYPE %%F >> PATCHED.TC
  42. Echo . >> PATCHED.TC
  43. Echo . The following is the output of the PATCH process for each of the above >> PATCHED.TC
  44. Echo . >> PATCHED.TC
  45. Echo On
  46. For %%F In (??????TC.DIF) DO PATCH %%F TC.EXE >> PATCHED.TC
  47. For %%F In (?????TC.DIF) DO PATCH %%F TC.EXE  >> PATCHED.TC
  48. For %%F In (????TC.DIF) DO PATCH %%F TC.EXE  >> PATCHED.TC
  49. For %%F In (???TC.DIF) DO PATCH %%F TC.EXE  >> PATCHED.TC
  50. For %%F In (??TC.DIF) DO PATCH %%F TC.EXE  >> PATCHED.TC
  51. For %%F In (?TC.DIF) DO PATCH %%F TC.EXE  >> PATCHED.TC
  52. Echo Off
  53. Rem
  54. Rem Now, do the same for TCC files
  55. Rem
  56. COPY TCC.EXE  TCC.OLD
  57. Echo . >> PATCHED.TCC
  58. Echo . The following patches were applied on the date shown in 'PATCHED ON' >> PATCHED.TCC
  59. Echo .
  60. Dir  PATCHED.ON >> PATCHED.TCC
  61. Dir  *.DIF >> PATCHED.TCC
  62. Echo . >> PATCHED.TCC
  63. Echo . The following is the contents of the above files >> PATCHED.TCC
  64. Echo . >> PATCHED.TCC
  65. For %%F In (?????TCC.DIF) DO TYPE %%F >> PATCHED.TCC
  66. For %%F In (????TCC.DIF) DO  TYPE %%F >> PATCHED.TCC
  67. For %%F In (???TCC.DIF) DO  TYPE %%F >> PATCHED.TCC
  68. For %%F In (??TCC.DIF) DO  TYPE %%F >> PATCHED.TCC
  69. For %%F In (?TCC.DIF) DO  TYPE %%F >> PATCHED.TCC
  70. Echo . >> PATCHED.TCC
  71. Echo . The following is the output of the PATCH process for each of the above >> PATCHED.TCC
  72. Echo . >> PATCHED.TCC
  73. Echo On
  74. For %%F In (?????TCC.DIF) DO PATCH %%F TCC.EXE >> PATCHED.TCC
  75. For %%F In (????TCC.DIF) DO PATCH %%F TCC.EXE  >> PATCHED.TCC
  76. For %%F In (???TCC.DIF) DO PATCH %%F TCC.EXE  >> PATCHED.TCC
  77. For %%F In (??TCC.DIF) DO PATCH %%F TCC.EXE  >> PATCHED.TCC
  78. For %%F In (?TCC.DIF) DO PATCH %%F TCC.EXE  >> PATCHED.TCC
  79. Echo Off
  80. Del PATCHED.ON
  81. For %%F In (??????TC.DIF) DO DEL %%F
  82. For %%F In (?????TC.DIF) DO DEL %%F
  83. For %%F In (????TC.DIF) DO DEL %%F
  84. For %%F In (???TC.DIF) DO DEL %%F
  85. For %%F In (??TC.DIF) DO DEL %%F
  86. For %%F In (?TC.DIF) DO DEL %%F
  87. For %%F In (?????TCC.DIF) DO DEL %%F
  88. For %%F In (????TCC.DIF) DO DEL %%F
  89. For %%F In (???TCC.DIF) DO DEL %%F
  90. For %%F In (??TCC.DIF) DO DEL %%F
  91. For %%F In (?TCC.DIF) DO DEL %%F